<%@ taglib uri="/WEB-INF/vectrics.tld" prefix="vectrics" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<%@ page import="org.vectrics.recruiter.job.Job" %>
<%@ page import="org.vectrics.recruiter.*" %>
<%@ page import="org.vectrics.SystemException" %>
<%@ page import="org.vectrics.provider.*" %>

<%
	String jobId = request.getParameter("jobId");
	if ((jobId == null) || (jobId.trim().length() == 0))
		jobId = (String)request.getSession().getAttribute("current-job");
	String candidateMgrLink = request.getContextPath() + "/admin/jobs/candidate/index.do?id=" + jobId;	
	String jobChangeSkillsLink = request.getContextPath() + "/admin/job/skill/skillEntry.do?id=" + jobId;	
	if (jobId == null)
		throw new SystemException("JobId is null");
	
	Long jobIdLong = new Long(jobId);
	Job job = RecruitServiceLocator.getJobProvider().findJob(jobIdLong);
	if (job == null) {
		throw new SystemException("Could not find job, id = " + jobId);
	}
%>
<table>
	<tr>
		<td>
			<vectrics:recruiterJobView jobId="<%=jobId%>" summary="true"/>
			<br>
			<vectrics:jobHistory jobId="<%=jobId%>" />
		</td>
		<td valign="top" align="right">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<form action="/hrs-intranet/admin/jobs/view.do" method="POST">
							<input type="hidden" name="jobId" value="<%=jobId%>">
							<vectrics:formButton elementId="job.view.btn" code="button.param" phraseCode="button.job.view" value="submit" name="submit"/>
						</form>
					</td>
				</tr>
			</table>
		</td>
	</tr>	
</table>
